<?php

namespace app\modules\html\controllers;

use app\controllers\BaseController;

/**
 * [后台菜单]页面展示控制器
 */
class AdminMenuController extends BaseController
{

    /**
     * 页面布局文件
     */
    public $layout = '@app/views/layouts/mainAjax';

    /**
     * {@inheritdoc}
     */
    public function behaviors()
    {
        return [
            'access' => [
                'class' => \yii\filters\AccessControl::className(),
                'rules' => [
                    [ // 必须登陆才能访问
                        'actions' => [
                            'index'
                        ],
                        'allow' => true,
                        'roles' => ['@'],
                    ],
                    [ // 无需登陆即可访问
                        'actions' => [],
                        'allow' => false,
                        'roles' => ['?']
                    ],
                ]
            ]
        ];
    }

    /**
     * 列表页面
     * @return mixed
     */
    public function actionIndex()
    {

        return $this->render('index');
    }
}
